package com.crazymakercircle.cocurrent;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class FutureTaskScheduler extends Thread {
    //方法二是使用自建的线程池时，专用于处理耗时操作
    private static final ExecutorService pool = Executors.newFixedThreadPool(10);

    /**
     * 提交耗时任务
     */
    public static void add(Runnable executeTask) {
        pool.submit(executeTask);
    }

}
